/**
 * Visibility: 'hover' | 'always' | 'native'
 * Hide scrollbar-control on hover when visibility="hover"
 */
@mixin hoverVisibility {
  // Auto hide scrollbar-control
  &[visibility="hover"] {
    > .scrollbar-control {
      opacity: 0;
      transition-property: opacity;
      transition-duration: var(--scrollbar-transition-duration);
      transition-delay: var(--scrollbar-transition-delay);
    }

    &:hover,
    &:active,
    &:focus {
      > .scrollbar-control {
        opacity: 1;
        transition-duration: var(--scrollbar-transition-duration);
        transition-delay: 0ms;
      }
    }
  }
}
